package com.mercury.ec.module.air.controller.admin.demandorder.vo.demandscheme;

import com.mercury.ec.module.air.controller.admin.demandorder.vo.demandroute.AirDemandRouteQuoteReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 机票需求订单方案报价 Request VO")
@Data
public class AirDemandSchemeQuoteReqVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14111")
    private Long id;

    @Schema(description = "需求订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28212")
    private Long demandId;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "序号不能为空")
    private Integer serialNo;

    @Schema(description = "备注", example = "你猜")
    @Length(max = 255, message = "备注长度不能超过255")
    private String remark;

    @Schema(description = "状态 字典（air_demand_scheme_status）", example = "2")
    private Integer status;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String creator;

    @Valid
    @Schema(description = "行程列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行程列表不能为空")
    private List<AirDemandRouteQuoteReqVO> demandRoutes;
}
